<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags/loginRegister" %>

<c:set var="basePath" value="${pageContext.servletContext.contextPath}"/>
<t:template>
	<span id="welcome">
		<section class="loginform cf">
			<h3>Lūdzu aizpildiet visus laukus</h3>
			<form:form action="${basePath}/bank/ibank/register" commandName="customer" method="post">
				<table>
					<tr>
						<td style="width: 50px;"><label for="name">Vārds</label></td>
						<td><form:input path="name" placeholder="Pilns vārds" /></td>
						<td><form:errors path="name" /></td>
					</tr>
					<tr>
						<td style="width: 50px;"><label for="surname">Uzvārds</label></td>
						<td><form:input path="surname" placeholder="Pilns uzvārds" /></td>
						<td><form:errors path="surname" /></td>
					</tr>	
					<tr>
						<td style="width: 50px;"><label for="personCode">Personas kods</label></td>
						<td><form:input path="personCode" placeholder="Personas kods" /></td>
						<td><form:errors path="personCode" /></td>
					</tr>	
						<tr>
						<td style="width: 50px;"><label for="email">E-pasts</label></td>
						<td><form:input path="email" placeholder="piem. janis_p@inbox.lv" /></td>
						<td><form:errors path="email" /></td>
					</tr>	
					<tr>
						<td style="width: 50px;"><label for="birthDate">Dzimšanas diena</label></td>
						<td><form:input path="birthDate" placeholder="yyyy-MM-dd" /></td>
						<td><form:errors path="birthDate" /></td>
					</tr>	
					
					<tr>
						<td style="width: 50px;"><label for="password">Parole</label></td>
						<td><form:input path="password" type="password" placeholder="parole" /></td>
						<td><form:errors path="password" /></td>
					</tr>		
					<tr>
						<td style="width: 50px;"><label for="passwordRepeat">Parole(atkārtoti)</label></td>
						<td><form:input path="passwordRepeat" type="password" placeholder="atkārtoti" /></td>
						<td><form:errors path="passwordRepeat" /></td>
					</tr>																																														
					<tr>
						<td></td>
						<td colspan="2" ><span><a href="${basePath}/bank/auth/login">Atpakal</a></span><input type="submit" value="Reģistrēties"></td>
					</tr>
				</table>
			</form:form>
		</section>
	</span>			
</t:template>

